Cleaning up your project

You can decrease the size of the .kzb binary of your project by removing resources your project does not use:

Deleting the default textures

When you create a project Kanzi Studio adds to the project several default textures. These textures enable you to start working on your project without the need to import these basic assets. However, when you are done creating your project, delete these textures to decrease the size of your Kanzi application .kzb file.

To delete the default textures in the Library > Materials and Textures > Textures select, for example, the Default Texture and Default Cube Map Texture, and press Delete.

Deleting resources not used in your project

When you complete your project, it is good practice to delete all resources your project is not using. Deleting unused resources reduces the amount of memory your application uses and you simplify the structure of your project.

To delete resources your project is not using:

  1. In the Library select one or more libraries from which you want to delete unused resources, right-click and select Delete Unreferenced Items.
    If there are resources that are not used in your project, Kanzi Studio lists them in the Delete Unreferenced Items window.
  2. Select the checkbox next to each item you want to delete and click OK.

  3. (Optional) To prevent listing resources you access using the Kanzi Engine API, in the Library select the resource, in the Properties click , add, and enable the Is Used By Code property.

Excluding items from an application

If your project does not use a resource or node, you can optimize the size of your Kanzi application by excluding such items.

To exclude an item from an application:

  1. Select the item in the Project or Library.
  2. In the Properties click , add, and enable the Disable KZB Export property.
    If you disable a node or resource used by another node or resource that is not disabled, your application will not work. For example, if you disable a Mesh Data resource used by more than one Model node, your application will not work.

Removing redundant Animation Data channels

Whether importing animations from a third-party tool or creating them in Kanzi, animations sometimes contain Animation Data resources that do not animate anything. For example, when you add a keyframe for a Render Transformation by dragging the property from the Properties to the Animation Clip Editor, Kanzi adds an Animation Data resource for all property attributes, even if they have not changed.

Note that the static values in Animation Data resources have higher precedence than the local property values of the node. When you delete a channel with a static value, the local value becomes effective. Because sometimes even static values (Animation Data resources without any keyframes) contain valid information and are needed, consider cleaning up unnecessary animation information on a case by case basis.

To remove the redundant Animation Data resources:

  1. In the Library select Animations > Animation Clips and select your animation clip.
  2. Right-click the animation clip for which you want to remove the redundant Animation Data resources and select Delete Animations with One or Zero Effective Keyframes.
    These images show the same Animation Clip before and after removing the Animation Data resources without effective animations.

See also

Animations best practices

Best practices

Projects